#pragma once
#include <lcir/IR/Value.h>
#include <lcir/IR/Prototype.h>

#include <memory>
namespace lcir {
class Lambda;
class Argument final : public ValueCRTP<Argument> {
	Lambda *lambda{nullptr};

public:
  explicit Argument(std::unique_ptr<Prototype> proto, Lambda* lambda)
      : ValueCRTP(ValueKind::VK_Argument), lambda(lambda)  {
        Value::proto = std::move(proto);
        Value::proto->setValue(this);
      }

  static ValueKind getValueKind() { return ValueKind::VK_Argument; }
  Lambda *getLambda() const { return lambda; }

  explicit Argument() = delete;
  Argument(Argument &&other) = delete;
  Argument &operator=(Argument &&other) = delete;
  Argument(const Argument &other) = delete;
  Argument &operator=(const Argument &other) = delete;
  ~Argument() = default;
};
class LambdaArgumentProto
    : public PrototypeCRTP<LambdaArgumentProto, LambdaDialect> {
public:
  LambdaArgumentProto(Type *type) : PrototypeCRTP("lambdaArgProto", type) {}
};
} // namespace lcir

